package com.mutual.assistance.task.schedule;

import com.mutual.assistance.task.service.TaskPublish;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author chenyuxin
 * @version 1.0
 * @description 定时任务
 * @date 2023/5/2 20:53
 */
@Component
public class ScheduledTasks {

    @Resource
    private TaskPublish taskPublish;

    @Scheduled(cron = "0 0 0/3 * * ?")
    public void handleTask() {
        taskPublish.scheduledDeleteExpireTask();
    }
}
